import Vue from 'vue'
import Router from 'vue-router'
import index from '../view/index'
import communityList from '../view/community/communityList'
import communityMap from '../view/community/communityMap'
import communityTag from '../view/community/communityTag'
import spotList from '../view/spot/spotList'
import login from '../view/login/login'
import register from '../view/login/register'
import changeInformation from '../view/personal/changeInformation'
import findPassword from '../view/login/findPassword'
import changePassword from '../view/personal/changePassword'
import account from '../view/system/account'
import role from '../view/system/role'
import tradeArea from '../view/system/tradeArea'
import contractList from '../view/contract/contractList'
import taskList from '../view/contract/taskList'
import myTask from '../view/task/myTask'
import home from '../view/login/home'
import schedule from '../view/spot/schedule'
import bookSpotList from '../view/spot/bookSpotList'
import dealOrder from '../view/spot/dealOrder'
import reportSpotList from '../view/spot/reportSpotList'
import dealReport from '../view/spot/dealReport'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/login',
      name: login,
      component: login
    },
    {
      path: '/findPassword',
      name: findPassword,
      component: findPassword
    },
    {
      path: '/register',
      name: register,
      component: register
    },
    {
      path: '/',
      redirect: '/home',
      name: 'index',
      component: index,
      children: [{
        hidden: true,
        path: '/communityTag',
        name: 'communityTag',
        component: communityTag
      },
      {
        hidden: true,
        path: '/communityMap',
        name: 'communityMap',
        component: communityMap
      },
      {
        hidden: true,
        path: '/home',
        name: 'home',
        component: home
      },
      {
        hidden: true,
        path: '/communityList',
        name: 'communityList',
        component: communityList
      },
      {
        hidden: true,
        path: '/spotList',
        name: 'spotList',
        component: spotList
      },
      {
        hidden: true,
        path: '/changeInformation',
        name: 'changeInformation',
        component: changeInformation
      },
      {
        hidden: true,
        path: '/changePassword',
        name: 'changePassword',
        component: changePassword
      },
      {
        hidden: true,
        path: '/bookSpotList',
        name: 'bookSpotList',
        component: bookSpotList
      },
      {
        hidden: true,
        path: '/account',
        name: 'account',
        component: account
      },
      {
        hidden: true,
        path: '/dealReport',
        name: 'dealReport',
        component: dealReport
      },
      {
        hidden: true,
        path: '/reportSpotList',
        name: 'reportSpotList',
        component: reportSpotList
      },
      {
        hidden: true,
        path: '/dealOrder',
        name: 'dealOrder',
        component: dealOrder
      },
      {
        hidden: true,
        path: '/schedule',
        name: 'schedule',
        component: schedule
      },
      {
        hidden: true,
        path: '/myTask',
        name: 'myTask',
        component: myTask
      },
      {
        hidden: true,
        path: '/taskList',
        name: 'taskList',
        component: taskList
      },
      {
        hidden: true,
        path: '/role',
        name: 'role',
        component: role
      },
      {
        hidden: true,
        path: '/tradeArea',
        name: 'tradeArea',
        component: tradeArea
      },
      {
        hidden: true,
        path: '/contractList',
        name: 'contractList',
        component: contractList
      }
      ]
    }
  ]
})
